package com.jingan.nursinghome.regulatory.view;

import android.content.Context;
import android.graphics.Canvas;
import android.support.annotation.Nullable;
import android.util.AttributeSet;

import cn.android.support.v7.lib.sin.crown.base.BaseView;
import cn.android.support.v7.lib.sin.crown.utils.ProportionUtils;

/**
 * Created by 彭治铭 on 2017/11/2.
 */

public class KongView extends BaseView {
    public KongView(Context context) {
        super(context);
        init();
    }

    public KongView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    int widht = ProportionUtils.getInstance().adapterInt(720);
    int height = ProportionUtils.getInstance().adapterInt(240);

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        //super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        setMeasuredDimension(widht, height);
    }

    private void init() {
        setMainOrSub(true);
    }

    @Override
    public void draw(Canvas canvas) {
        super.draw(canvas);
        canvas.drawText("该机构暂无题目 ! !", widht / 2, height / 3, textPaint);
    }
}
